/**
 * 
 */
package com.wolfware.athsweb.controllers;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.wolfware.athsweb.domain.User;
import com.wolfware.athsweb.service.BackOfficeService;

/**
 * @author Christian Strzadala
 * 
 */
public class UserListController implements Controller {

	private BackOfficeService athsWebBackOfficeService;

	/**
	 * @param athsWebBackOfficeService
	 *            the athsWebBackOfficeService to set
	 */
	public void setAthsWebBackOfficeService(final BackOfficeService athsWebBackOfficeService) {
		this.athsWebBackOfficeService = athsWebBackOfficeService;
	}

	/**
	 * @param
	 */
	public ModelAndView handleRequest(final HttpServletRequest request,
			final HttpServletResponse response) throws Exception {
		List<User> registeredUserList = athsWebBackOfficeService.getRegisteredUsersList();

		return new ModelAndView("registeredUsersMVC", "userList", registeredUserList);
	}

}
